
public class Hydrogen extends AbstractAtom{
	private float molWeight;
	private float atomicRadii; //radius in pm
	private float electroNeg;
	private int numOfBonds;
	private int electroCharge; //  -1 is negative, 0 is neutral, 1 is positive
	private String elementChar = "H";
	
	static int MAX_BONDS = 1;

	protected float ambient[] =  {0.8f, 0.8f, 0.8f, 1.0f};
	protected float diffuse[] =  {1.0f, 1.0f, 1.0f, 1.0f};
	protected float specular[] =   {1.0f, 1.0f, 1.0f, 1.0f};
    protected float emission[] = {0.0f, 0.0f, 0.0f, 1.0f};
	protected float shininess[] = {32.0f};
	
	Hydrogen()
	{
		molWeight = 1.00794f;
		atomicRadii = 53.0f;
		electroNeg = 2.20f;
		numOfBonds = 0;
		electroCharge = -1;			
	}
	
	//Get functions

	public float getMolWeight()
	{
		return molWeight;
	}
	
	public float getAtomicRadii()
	{
		return atomicRadii;
	}
	public float getElectroNeg()
	{
		return electroNeg;
	}
	public int getNumOfBonds()
	{
		return numOfBonds;
		
	}
	public int getNumOfMaxBonds()
	{
		return MAX_BONDS;
	}
	
	//Set functions
	
	public void addBond()
	{
		numOfBonds += 1;
		//checks to see if the charge is affected
		checkElectroCharge();
	}
	
	public void removeBond()
	{
		numOfBonds -= 1;
		checkElectroCharge();
	}
	
	//Electro charge check
	
	public void checkElectroCharge()
	{
		if (numOfBonds > 1) { electroCharge = 1; }
		if (numOfBonds < 1) { electroCharge = -1; }
		if (numOfBonds == 1) { electroCharge = 0; }

	}
	
	public void setAmbient(float ambArray[])
	{
		
		for (int i = 0; i < 4; i++)
		{
			this.ambient[i] = ambArray[i];
		}
				
	}
	
	public void setDiffuse(float diffArray[])
	{
		
		for (int i = 0; i < 4; i++)
		{
			this.diffuse[i] = diffArray[i];
		}
				
	}
	public void setSpecular(float specArray[])
	{
		
		for (int i = 0; i < 4; i++)
		{
			this.specular[i] = specArray[i];
		}
				
	}
	public void setEmission(float emisArray[])
	{
		
		for (int i = 0; i < 4; i++)
		{
			this.emission[i] = emisArray[i];
		}
				
	}

}

